#!/usr/bin/python

import sys
import re

filename = sys.argv[1] + '.blastp.tbl'

f = open(filename, "r")

def fmt(f):
    st = '{0:.4}'.format(f)
    return st

lines = f.readlines()

if len(lines) == 0:
    print sys.argv[1], "\t", "-"
else:
    st = lines[0]
    line = st.split('\t')
    acc = line[9]
    m = re.split('\|', acc)
    print sys.argv[1], "\t", m[1]

f.close()

